{include file="public/header" /} {include file="public/lefter" /}
<link rel="stylesheet" type="text/css" href="__PLUG__/aliico/iconfont.css"/>
<div class="container-fluid box-a">
	<div class="nav-c">
		<span class="glyphicon glyphicon-tag">&nbsp;<span id="">添加用户</span>
	</div>
	<box class="box-b">
		<div class="divs" class="row">
			<div class="page-header page-s">
				<h1>编辑密码与分组<small></small></h1>
			</div>
			<form id="edit" class="form-horizontal">
				<div class="form-group">
					<input type="hidden" name="uid" id="uid" value="{$uid}" />
					<label for="inputnetname" class="col-sm-3 col-md-3 col-lg-2 control-label">用户名</label>					
					<div class="col-sm-8 col-md-6 col-lg-4">
						<input type="text" name="name" class="form-control" id="inputname" placeholder="UserName" value="{$userdb['name']}" disabled/>
					</div>
					<label style="color: red;" class="control-label">*</label>
				</div>
				<div class="form-group">
					<label for="inputnetname" class="col-sm-3 col-md-3 col-lg-2 control-label">密码</label>
					<div class="col-sm-8 col-md-6 col-lg-4">
						<input type="password" name="password" class="form-control" id="inputname" placeholder="Password" value="" />
					</div>
					<label style="color: red;" for="inputpwd" class="control-label">*</label>
				</div>
				<div class="form-group">
					<label for="inputpwd" class="col-sm-3 col-md-3 col-lg-2 control-label">确认密码</label>
					<div class="col-sm-8 col-md-6 col-lg-4">
						<input type="password" name="password2" class="form-control" id="inputname" placeholder="Password" value="" />
					</div>
					<label style="color: red;" for="inputpwd" class="control-label">*</label>
				</div>
				<div class="form-group">
					<label for="inputpwd" class="col-sm-3 col-md-3 col-lg-2 control-label">用户积分</label>
					<div class="col-sm-8 col-md-6 col-lg-4">
						<input type="text" name="score" class="form-control" placeholder="积分值" value="{$userdb['score']}" />
					</div>
					<label style="color: red;" for="inputpwd" class="control-label">*</label>
				</div>
				<div class="form-group">
					<label for="inputpwd" class="col-sm-3 col-md-3 col-lg-2 control-label">备注信息</label>
					<div class="col-sm-8 col-md-6 col-lg-4">
						<input type="text" name="comments" class="form-control" placeholder="积分值" value="{$userdb['comments']}" />
					</div>
					
				</div>
				
				<div class="form-group">
					<label for="inputpwd" class="col-sm-3 col-md-3 col-lg-2 control-label">所在用户组</label>
					<div class="col-sm-8 col-md-6 col-lg-4">
						<select class="form-control" name="usergroup">
					        {volist name="groupinfo" id="vo"}
					        {if condition="$vo.title == $usergroup"}
                            <option value="{$vo.id}" selected="selected">{$vo.title}</option>
                            {else /}
                            <option value="{$vo.id}">{$vo.title}</option>
                            {/if}
                            {/volist}
                        </select>
					</div>
					<label style="color: red;" for="inputpwd" class="control-label">*</label>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-3 col-md-offset-3 col-lg-offset-2 col-sm-8 col-md-6 col-lg-4">
						<a role="button" href="{:URL('/admin/user')}" type="button" class="btn btn-warning">返回</a>
						<button id="subedit" type="submit" class="btn btn-primary">确认修改</button>
					</div>
				</div>
			</form>
		</div>
	</box>
</div>

{include file="public/flooter" /}
<script type="text/javascript">
	$(document).ready(function() {		
		$('#subedit').click(function() {
			var str_data = $("#edit").serialize();			
			$.ajax({
				type: "get",
				url: "{:URL('/admin/user/edit')}",
				data: str_data,
				success: function(msg) {
					layer.alert(msg);
				}
			});
			return false;
		});		
	});
</script>